Integrand size = 34, antiderivative size = 56 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=-\frac {a (A+2 B) x}{c}+\frac {a B \cos (e+f x)}{c f}+\frac {2 a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))} \]
Time = 5.17 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.91 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=\frac {a \cos (e+f x) \left (-2 (A+2 B) \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (e+f x)}+\sqrt {1+\sin (e+f x)} (-2 A-3 B+B \sin (e+f x))\right )}{c f (-1+\sin (e+f x)) \sqrt {1+\sin (e+f x)}} \]
(a*Cos[e + f*x]*(-2*(A + 2*B)*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]]*Sqrt[ 1 - Sin[e + f*x]] + Sqrt[1 + Sin[e + f*x]]*(-2*A - 3*B + B*Sin[e + f*x]))) /(c*f*(-1 + Sin[e + f*x])*Sqrt[1 + Sin[e + f*x]])
Time = 0.40 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.09, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.147, Rules used = {3042, 3446, 3042, 3336, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a \sin (e+f x)+a) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (e+f x)+a) (A+B \sin (e+f x))}{c-c \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a c \int \frac {\cos ^2(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \frac {\cos (e+f x)^2 (A+B \sin (e+f x))}{(c-c \sin (e+f x))^2}dx\) |
\(\Big \downarrow \) 3336 |
\(\displaystyle a c \left (\frac {\int (-((A+2 B) c)-B \sin (e+f x) c)dx}{c^3}+\frac {2 (A+B) \cos (e+f x)}{f \left (c^2-c^2 \sin (e+f x)\right )}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a c \left (\frac {\frac {B c \cos (e+f x)}{f}-c x (A+2 B)}{c^3}+\frac {2 (A+B) \cos (e+f x)}{f \left (c^2-c^2 \sin (e+f x)\right )}\right )\) |
a*c*((-((A + 2*B)*c*x) + (B*c*Cos[e + f*x])/f)/c^3 + (2*(A + B)*Cos[e + f* x])/(f*(c^2 - c^2*Sin[e + f*x])))
3.1.21.3.1 Defintions of rubi rules used
Int[cos[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*( (c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[2*(b*c - a*d)*Cos [e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(2*m + 3))), x] + Simp[1/(b^ 3*(2*m + 3)) Int[(a + b*Sin[e + f*x])^(m + 2)*(b*c + 2*a*d*(m + 1) - b*d* (2*m + 3)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -3/2]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 0.59 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.20
method | result | size |
derivativedivides | \(\frac {2 a \left (-\frac {2 A +2 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}+\frac {B}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}-\left (A +2 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f c}\) | \(67\) |
default | \(\frac {2 a \left (-\frac {2 A +2 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}+\frac {B}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}-\left (A +2 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f c}\) | \(67\) |
parallelrisch | \(\frac {2 \left (\frac {B \cos \left (2 f x +2 e \right )}{4}+\left (-\frac {1}{2} f x A -f x B +A +\frac {3}{2} B \right ) \cos \left (f x +e \right )+\left (A +B \right ) \sin \left (f x +e \right )+A +\frac {5 B}{4}\right ) a}{c f \cos \left (f x +e \right )}\) | \(67\) |
risch | \(-\frac {a x A}{c}-\frac {2 a x B}{c}+\frac {B a \,{\mathrm e}^{i \left (f x +e \right )}}{2 c f}+\frac {B a \,{\mathrm e}^{-i \left (f x +e \right )}}{2 c f}+\frac {4 a A}{f c \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}+\frac {4 a B}{f c \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}\) | \(104\) |
norman | \(\frac {\frac {a \left (A +2 B \right ) x}{c}+\frac {a \left (A +2 B \right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}-\frac {4 a A +4 B a}{c f}-\frac {2 B a \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {2 B a \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {\left (4 a A +2 B a \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {2 \left (4 a A +3 B a \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {a \left (A +2 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c}+\frac {2 a \left (A +2 B \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}-\frac {2 a \left (A +2 B \right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}-\frac {a \left (A +2 B \right ) x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}\) | \(269\) |
2/f*a/c*(-(2*A+2*B)/(tan(1/2*f*x+1/2*e)-1)+B/(1+tan(1/2*f*x+1/2*e)^2)-(A+2 *B)*arctan(tan(1/2*f*x+1/2*e)))
Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (57) = 114\).
Time = 0.27 (sec) , antiderivative size = 116, normalized size of antiderivative = 2.07 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=-\frac {{\left (A + 2 \, B\right )} a f x - B a \cos \left (f x + e\right )^{2} - 2 \, {\left (A + B\right )} a + {\left ({\left (A + 2 \, B\right )} a f x - {\left (2 \, A + 3 \, B\right )} a\right )} \cos \left (f x + e\right ) - {\left ({\left (A + 2 \, B\right )} a f x - B a \cos \left (f x + e\right ) + 2 \, {\left (A + B\right )} a\right )} \sin \left (f x + e\right )}{c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f} \]
-((A + 2*B)*a*f*x - B*a*cos(f*x + e)^2 - 2*(A + B)*a + ((A + 2*B)*a*f*x - (2*A + 3*B)*a)*cos(f*x + e) - ((A + 2*B)*a*f*x - B*a*cos(f*x + e) + 2*(A + B)*a)*sin(f*x + e))/(c*f*cos(f*x + e) - c*f*sin(f*x + e) + c*f)
Leaf count of result is larger than twice the leaf count of optimal. 828 vs. \(2 (48) = 96\).
Time = 1.03 (sec) , antiderivative size = 828, normalized size of antiderivative = 14.79 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=\text {Too large to display} \]
Piecewise((-A*a*f*x*tan(e/2 + f*x/2)**3/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan (e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) + A*a*f*x*tan(e/2 + f*x/2)* *2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/ 2) - c*f) - A*a*f*x*tan(e/2 + f*x/2)/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/ 2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) + A*a*f*x/(c*f*tan(e/2 + f*x/2 )**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 4*A*a*tan(e /2 + f*x/2)**2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*ta n(e/2 + f*x/2) - c*f) - 4*A*a/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x /2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 2*B*a*f*x*tan(e/2 + f*x/2)**3/(c*f* tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f ) + 2*B*a*f*x*tan(e/2 + f*x/2)**2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 2*B*a*f*x*tan(e/2 + f*x/2)/(c*f *tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c* f) + 2*B*a*f*x/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*ta n(e/2 + f*x/2) - c*f) - 4*B*a*tan(e/2 + f*x/2)**2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) + 2*B*a*tan(e/2 + f*x/2)/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 6*B*a/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f), Ne(f, 0)), (x*(A + B*sin(e))*(a*sin(e) + a) /(-c*sin(e) + c), True))
Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (57) = 114\).
Time = 0.30 (sec) , antiderivative size = 265, normalized size of antiderivative = 4.73 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=-\frac {2 \, {\left (B a {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - 2}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {c \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {c \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c}\right )} + A a {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c} - \frac {1}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} + B a {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c} - \frac {1}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {A a}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \]
-2*(B*a*((sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 2)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + c*sin(f*x + e)^2/(cos( f*x + e) + 1)^2 - c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) + A*a*(arctan(sin(f*x + e)/(cos(f*x + e) + 1)) /c - 1/(c - c*sin(f*x + e)/(cos(f*x + e) + 1))) + B*a*(arctan(sin(f*x + e) /(cos(f*x + e) + 1))/c - 1/(c - c*sin(f*x + e)/(cos(f*x + e) + 1))) - A*a/ (c - c*sin(f*x + e)/(cos(f*x + e) + 1)))/f
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (57) = 114\).
Time = 0.31 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.09 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=-\frac {\frac {{\left (A a + 2 \, B a\right )} {\left (f x + e\right )}}{c} + \frac {2 \, {\left (2 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, A a + 3 \, B a\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )} c}}{f} \]
-((A*a + 2*B*a)*(f*x + e)/c + 2*(2*A*a*tan(1/2*f*x + 1/2*e)^2 + 2*B*a*tan( 1/2*f*x + 1/2*e)^2 - B*a*tan(1/2*f*x + 1/2*e) + 2*A*a + 3*B*a)/((tan(1/2*f *x + 1/2*e)^3 - tan(1/2*f*x + 1/2*e)^2 + tan(1/2*f*x + 1/2*e) - 1)*c))/f
Time = 12.74 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.98 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx=\frac {\left (4\,A\,a+4\,B\,a\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-2\,B\,a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+4\,A\,a+6\,B\,a}{f\,\left (-c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-c\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+c\right )}-\frac {A\,a\,f\,x+2\,B\,a\,f\,x}{c\,f} \]